home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PRINTER
/
PROHP.ARJ
/
DHMI.PRG
< prev
next >
Wrap
Text File
|
1992-06-23
|
3KB
|
77 lines
/*
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ Program : HMI.PRG │
│ │
│ Purpose : demonstrate the use of HP_hmi(). │
│ │
│ Author : Copyright (C) 1992, I.L.A.,Inc. All Rights reserved. │
│ │
│ Comments: This source code may be distributed and used freely │
│ provided that the copyright notice is not removed. │
│ │
└─────────────────────────────────────────────────────────────────────────┘
*/
#include "prohp.ch"
proc main()
Local cNumLine:="12345678901234567890123456789012345678901234567890"
Local i, nTableW := 5, cL1,cL2,nHmi
/*
hmi sould be set to n / 120 inch.
*/
set2print("dhmi.hpc")
HP_init()
qout()
HP_rline(0.01,nTableW,GFILLBLACK)
HP_cols(16) // 16 cols per inch, this function change the HMI setting.
for i:=1 to 81
HP_savecsr() // save cursor
if i%16=1
HP_rline(3,0.003,GFILLBLACK) // draw line at current csr pos
else
HP_rline(3,0.01,GFILLGRAY,20) // draw line at current csr pos
endif
HP_restcsr() // restore curs pos
QQOUT(" ") // advance the cursor one space/column
next
qout()
HP_pitch(10) // 10 cpi
qout("This line is in 10 CPI ")
qout(cNumLine)
qout()
HP_hmi(10) // 12 cols per inch
qout("This text forced to 12 CPI using HP_hmi()")
qout(cNumLine)
qout()
HP_pitch(16) // 16 cpi
qout("This line is in 16.66 CPI ")
qout(cNumLine)
qout()
HP_hmi(6) // 20 cols per inch
qout("This text forced to 20 CPI using HP_hmi()")
qout(cNumLine)
qout()
cL1:="* Remember ! HMI has the above effect on fixed spacing fonts."
cL2:="with Proportional spacing fonts HMI affect only the space character."
HP_pitch(10) // courier 10
nHmi := nTableW * 120 / len(cL1) // to fit cL1 in nTableW
HP_hmi(nHmi) // set HMI
qout(cL1) // print cL1
// qout("Str Len :",len(cl1)," Size:",HPstsize(cL1),["])
HP_pitch(16) // now use courier 16
nHmi := nTableW * 120 / len(cL2) // fit this line also
HP_hmi(nHmi) // set HMI
qout(cL2) // print cL2
// qout("Str Len :",len(cL2)," Size:",HPstsize(cL2),["])
HP_reset()
set2screen()
return